import app from "../index.js";
import Result from "../class/Result.js";
import { deleteMessages } from "../service/messageService";

app.delete("/api/read_message", async (req, res) => {
  const { messageIds } = req.body;

  // 保存消息
  if (await deleteMessages(messageIds)) {
    res.json(Result.success());
  } else {
    res.json(Result.fail());
  }
});
